package com.example.springstudy.dao.dbo;

import com.example.springstudy.entity.Menu;
import lombok.Data;

import java.util.List;

@Data
public class MenuInfo {
    private int id;
    private int parentId;
    private String name;
    private int type;
    private String perm;
    private String routeName;
    private String routePath;
    private int visible;
    private String component;
    private int sort;
    private List<MenuInfo> children;

    public MenuInfo(Menu menu){
        this.id = menu.getId();
        this.parentId = menu.getParentId();
        this.perm = menu.getPerm();
        this.name = menu.getName();
        this.type = menu.getType();
        this.component = menu.getComponent();
        this.routeName = menu.getRouteName();
        this.routePath = menu.getRoutePath();
        this.visible = menu.getVisible();
        this.sort = menu.getSort();
    }
}
